/*
 * ItemRoutingRateResource.h
 *
 *  Created on: 2014. 3. 5.
 *      Author: mega
 */

#ifndef ITEMROUTINGRATERESOURCE_H_
#define ITEMROUTINGRATERESOURCE_H_

#include <map>

namespace ProjectZ { namespace NResource {

class ItemRoutingRateResource
{
public:
	struct Flyweight
	{
		int _EFFECT_TYPE;
		int _QUALITY1;
		int _QUALITY2;
		int _QUALITY3;
		int _QUALITY4;
		int _QUALITY5;
		int _QUALITY6;
		int _QUALITY7;
		int _QUALITY8;
		int _QUALITY9;
		int _QUALITY10;
		int _VALUE_TYPE;
		int _LEVEL_CONST;
		int _OVER_A_TYPE;
		int _RATE;
	};


public:
	typedef std::map<int, Flyweight *> ITEMROUTINGRATETREE;

public:
	ItemRoutingRateResource();
	virtual ~ItemRoutingRateResource();

	bool		LoadResource();
	Flyweight *	GetFly(int effectType);
	int			GetTotalRate();

	ITEMROUTINGRATETREE & GetTree();

private:
	void		Clear();

private:
	ITEMROUTINGRATETREE clsFlyTree;
	int totalRate;

};

} /*NResource*/ } /*ProjectZ*/

#endif /* ITEMROUTINGRATERESOURCE_H_ */
